Skip to content

Split translations between EW and shared components#31441

Merged
dbkr merged 36 commits intodevelopfrom
dbkr/split_translations
Jan 7, 2026
Merged

Split translations between EW and shared components#31441
dbkr merged 36 commits intodevelopfrom
dbkr/split_translations

Conversation

@dbkr
Copy link
Copy Markdown
Member

@dbkr dbkr commented Dec 5, 2025

Uses updated module API with global TranslationKey type that can be overridden.

This does a bunch of things because it turned out to be easier to do them all together:

  • Split the translations for shared components out into the shared components package
  • Likewise for the actual translated language files
  • Duplicate the i18n lint job to also do the same on shared components
  • Make TranslationKey a global type and override it in each project to be the keys of that project, based off each project's new en_EN.json
  • Merge the two translations files back together again at build time so element web has both sets of translations at runtime
  • Have shared components storybook generate the list of languages dynamically and serve each language file from the src directory so it no longer needs to depend on element web's files

What it does not do (that can be done later):

  • Convert aaaaaaalllllll of element web to using _t from the context

Note that this changes the "i18n Check" workflow to split it into two so the expected checks will need changing, so this will stay pending on this PR until we update it. The two new i18n check jobs are expected fails because we are deliberately changing translated language files.

To do after merge:

  • Remove the "i18n check" check from expected checks and add the two new ones
  • Run localazy upload existing (with appropriate creds) to upload the shared-component non-source translations (this could also be just before merge)

Checklist

Uses update module API with global TranslationKey type that can be
overridden.

WIP.
@dbkr dbkr added the T-Task Tasks for the team like planning label Dec 5, 2025
dbkr added 2 commits December 17, 2025 17:57
NB. there are lots of removed strings for a few languages where we
seem to have hit a localazy bug or something where the key/value
for plurals got switched, making the translations invalid. They've
been missing for a while so I'm removing them rather than trying to
restore them,
@dbkr dbkr merged commit 13696af into develop Jan 7, 2026
35 of 37 checks passed
@dbkr dbkr deleted the dbkr/split_translations branch January 7, 2026 11:49
@dbkr dbkr mentioned this pull request Jan 7, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants